Visual Basic (Declaration) | |
---|---|
Public Class NewFactory(Of T As {New}) Implements IFactory(Of T) |
C# | |
---|---|
public class NewFactory<T> : IFactory<T> where T: new() |
- T
Library/Library.Test/TestFactories.cs
C# | Copy Code |
---|---|
IFactory<TestObject> factory = new NewFactory<TestObject>();
Assert.IsFalse(ReferenceEquals(factory.Create(), factory.Create())); |
VB.NET | Copy Code |
---|---|
Dim factory As IFactory(Of TestObject) = New NewFactory(Of TestObject)() Assert.IsFalse(ReferenceEquals(factory.Create(), factory.Create())) |
System.Object
CSharpTest.Net.Interfaces.NewFactory<T>
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7